<template>
  <div class="form-design-editor">
    <div class="form-design-menu"></div>
    <div class="form-design-left">
      <div class="top-title">
        物料区
      </div>
      <materialList />
    </div>
    <div class="form-design-right">
      <div class="tabs">
        <div @click="settingType = 1" :class="settingType === 1 ? 'on' : ''">表单设置</div>
        <div @click="settingType = 2" :class="settingType === 2 ? 'on' : ''">字段设置</div>
      </div>
      <formSetting v-if="settingType === 1" style="height:2000px" />
      <fieldSetting v-if="settingType === 2" />
    </div>
    <div class="form-design-main">
      <!-- <formEditor /> -->
    </div>
  </div>
</template>
<script>
import formSetting from './formSetting.vue'
import fieldSetting from './fieldSetting.vue'
import materialList from './materialList.vue'
import formEditor from './formEditor/index.vue'
export default {
  components: {
    formEditor,
    formSetting,
    fieldSetting,
    materialList
  },
  data() {
    return {
      settingType: 1
    }
  }
}
</script>
<style lang="less" scoped>
.form-design-editor {
  font-size: 14px;
  display: grid;
  grid-template-rows: 30px 1fr;
  grid-template-columns: 240px 1fr 200px;
  grid-template-areas: "menu menu menu" "list  main right";
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.form-design-menu {
  grid-area: menu;
  background: #fff;
  border-bottom: 1px solid #ccc;
}

.form-design-left {
  grid-area: list;
  background: #fff;
  border-right: 1px solid #ccc;
}

.form-design-right {
  grid-area: right;
  background: #fff;
  border-left: 1px solid #ccc;
}

.form-design-main {
  grid-area: main;
  background-color: #f5f5f5;
  overflow: hidden;
}

.cccc {
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
}
</style>